{extend name="layout/layout" /}

{block name="pagecss"}
<style>
	table.dataTable.no-footer {
		border-bottom: 0 !important;
	}
	#data-table_processing {
		border: 0 !important;
		position: relative;
	}
</style>
{/block}

{block name="content"}
<div class="row js-check-wrap">
	<div class="col-lg-12">
		<div class="box box-success">
			<div class="box-header with-border">
				<div>
					<form id="searchForm" class="relative row">
						<div class="grid-btn" id="search">
							<div class="col-md-2">
								<select name="typeId" class="form-control ">
									<option value="">所有用户</option>
									{volist name="memberTypeList" id="memberType"}
									<option value="{$memberType.id}">{$memberType.memType}</option>
									{/volist}
								</select>
							</div>
							<div class="col-md-2">
								<input type="text" class="form-control" name="mobile" placeholder="手机号" maxlength="44">
							</div>
							<div class="col-md-2">
								<input type="text" class="form-control daterange-picker" name="create_time" placeholder="开通会员时间">
							</div>
							<div class="col-md-1 cy-mar-ver-s">
								<button type="button" class="btn btn-success" id="doSearch" title="搜索">
									<i class="fa fa-search"></i> 搜索
								</button>
								<!--<button class="btn btn-primary cy-pad-rgt-s" id="doSearch" type="button">搜索</button>-->
							</div>
						</div>
					</form>
				</div>
				<div class="box-tools pull-right">
					<button type="button" class="btn bg-navy" data-toggle="modal" data-target="#handle_modal"><i class="fa fa-random"></i> 批量操作</button>
				</div>
			</div>
			<div class="box-body ">
				<form class="js-ajax-form" method="post">
					<div class="table-responsive">
						<table id="data-table" class="table table-bordered table-hover dataTable">
							<thead>
							<th>头像</th>
							<th>名字</th>
							<th>手机号</th>
							<th>类型</th>
							<th>开通时间</th>
							<th>消费次数</th>
							<th>消费总额（元）</th>
							<th>账户余额（元）</th>
							<th>操作</th>
							</thead>
						</table>
					</div>
				</form>
			</div>
			<div class="box-footer">

			</div>
		</div>
	</div>
</div>

<!-- 图片弹框 -->
<div class="modal fade" id="handle_modal" data-backdrop="static" data-keyboard="false">
	<div class="modal-dialog" style="width:700px; height: 520px;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
				<h4 class="modal-title">批量操作</h4>
			</div>
			<div class="modal-body">
				<div class="row">
					<div class="col-md-12">
						<div class="form-group">
							<label class="control-label col-md-4">
								批量导入模板：
							</label>
							<div class="col-md-8">
								<!--<button type="button" id="download_template" class="btn btn-primary">下载Excel模板</button>-->
								<a href="__UPLOAD__/csv/user/template.csv" download="template.csv" class="btn btn-primary">下载Excel模板</a>
								<span>请按照模板编辑数据</span>
							</div>
						</div>
					</div>
				</div>
				<div class="row" style="margin: 10px 0">
					<div class="col-md-12">
						<div class="form-group">
							<label class="control-label col-md-4" style="padding: 0">
								批量导入：
							</label>
							<div class="col-md-8">
								<form id="import_form" action="{:url('admin/member/import')}" method="post" enctype="multipart/form-data">
									<input type="hidden" class="form-control" name="_token" value="11">
									<button type="button" id="import_csv" class="btn btn-primary" style="float: left;margin-right: 10px;margin-left: -5px">导入</button>
									<input type="file" class="form-control" id="csv_file" name="csv_file" style="float: left;width: 60%">
								</form>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<div class="form-group">
							<label class="control-label col-md-4">
								批量导出：
							</label>
							<div class="col-md-8">
								<button type="button" id="export_csv" data-url="{:url('admin/member/export')}" class="btn btn-primary">
									<i class="fa fa-download"></i> 导出数据
								</button>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--<div class="modal-footer">
				<button type="button" id="" class="btn default close-check" data-dismiss="modal">确定</button>
			</div>-->
		</div>
	</div>
</div>

<input type="hidden" class="datalist_url" value="{:url('admin/member/getMemberList')}">
<input type="hidden" class="view_url" value="{:url('admin/member/view')}">
{/block}

{block name="pagescript"}
<script src="__STATIC__/admin/js/include.js" type="text/javascript"></script>
<script src="__STATIC__/admin/pages/js/member.js" type="text/javascript"></script>
{/block}